package cn.wolfcode.qo;

import lombok.Getter;
import lombok.Setter;
import org.springframework.util.StringUtils;

@Getter
@Setter
public class QueryObject {
    private int currentPage=1;
    private int pageSize=5;
    private String keyWord;
    private Integer status;

    public int getStart(){
        return (currentPage - 1) * pageSize;
    }


    //覆写
    public String getKeyWord(){
        if (StringUtils.hasText(keyWord)){
            return keyWord.trim();
        }
        return null;
    }
}
